<template>
	<view class="container">
		<uni-section title="千禧店铺新闻信息" type="line">
	<uni-list v-for="(item, index) in news" :key="index">
		
			<uni-card :title=item.title extra="额外信息">
				<text class="uni-body">{{item.content}}</text>
			</uni-card>
		
	</uni-list>
</uni-section>
		

	</view>
</template>

<script>
	import {baseUrl} from 'libs/util/global'
	export default {
		components: {},
		data() {
			return {
				news: [{
					index: 1,
					title: '测试',
					content: '内容'
				}]
			}
		},
		mounted(){
			this.getNewsList()
		},
		methods: {
			getNewsList(){
				let selectInventoryStoreUrl = baseUrl+'/news/list'
				uni.request({
					url: selectInventoryStoreUrl,
					header: {'content-type': 'application/x-www-form-urlencoded'},
					method: 'GET',
					data: {},
					success: (res) => {
						if (res.data.data != null) {
							// 拿到连锁店下拉框信息
							console.log(res.data)
							this.news = res.data.data			
						} else {	
							uni.showToast({
							title: '暂无库存统计信息！',
							icon: 'none',
							duration: 500
								});
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.container {
		overflow: hidden;
	}


</style>
